<template>
  <div class="orders-management views-container">
    <el-dialog
      @close="resetDialogFormData"
      :visible.sync="dialogTableVisible"
      custom-class="reset-pwd wlm-form-dialog dialog-table"
    >
      <div
        class="wlm-form"
        v-if="dialogTableVisible"
      >
        <div class="wlm-form-header wlm-dialog-fixheader">
          <span class="wlm-dialog-inlenr">{{formType == '1'?'商家发货':formType == '3'? '确认核销' :formType == '3-1'?'确认延期':formType == '4'?'订单改价':formType == '5'?'退款':'-'}}</span>
        </div>
        <el-scrollbar wrap-class="scrollbar-wrapper">
          <div class="wlm-form-content">
            <div class="wlm-dialog-main">
              <div class="wlm-dialog-content">
                <el-form
                  ref="userForm"
                  :model="formFormatData.formData"
                  :rules="formFormatData.rules"
                  size="small"
                  label-width="120px"
                  class="retail-form"
                  label-position="right"
                >
                  <template v-if="formType === '1'">
                    <el-form-item label="审核状态">
                      <el-radio-group v-model="formFormatData.formData.status">
                        <el-radio label="0">同意</el-radio>
                        <!-- <el-radio label="1">不同意</el-radio> -->
                      </el-radio-group>
                    </el-form-item>
                    <!-- <el-form-item label="原因" prop="reason" v-if="formFormatData.formData.status === '1'">
                                        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 4}" v-model.trim="formFormatData.formData.reason">
                                        </el-input>
                                    </el-form-item> -->
                    <el-form-item
                      label="默认快递公司"
                      prop="express_company"
                      v-if="formFormatData.formData.status=='0'"
                    >
                      <el-select
                        v-model="formFormatData.formData.express_company"
                        placeholder="请选择"
                      >
                        <el-option
                          v-for="(item,index) in expressList"
                          :key="index"
                          :label="item"
                          :value="item"
                        >
                        </el-option>
                      </el-select>
                    </el-form-item>
                    <el-form-item
                      label="青龙配送编码"
                      prop="customerName"
                      v-show="formFormatData.formData.express_company == '京东快递'"
                    >
                      <el-input v-model="formFormatData.formData.customerName"></el-input>
                    </el-form-item>
                    <el-form-item
                      label="物流单号"
                      prop="express_no"
                      v-if="formFormatData.formData.status=='0'"
                    >
                      <el-input v-model.trim="formFormatData.formData.express_no">
                      </el-input>
                    </el-form-item>
                  </template>
                  <template v-if="formType === '3'">

                    <div style="display:flex">
                      <el-form-item
                        label=""
                        label-width="0"
                      >
                        <el-input
                          v-model="verificationSerch"
                          placeholder="请输入核销码"
                        >
                        </el-input>
                        <el-button
                          size="small"
                          type="primary"
                          style="margin-left:8px; margin-top:10px;"
                          @click="verificationGet"
                        >搜索</el-button>
                        <el-button
                          size="small"
                          type="text"
                          style="margin-left:8px;margin-top:10px;"
                          @click="clearVerification"
                        >清空</el-button>
                      </el-form-item>
                    </div>
                    <el-form-item
                      label=""
                      label-width="0"
                      :prop="transport_type==50?'bus_id':''"
                      v-if="this.transport_type==50"
                    >
                      <div style="display:flex;">
                        <div>
                          选择商家：
                        </div>
                        <el-select
                          v-model="formFormatData.formData.bus_id"
                          placeholder="请选择核销商家"
                          @change="changbtn"
                        >
                          <el-option
                            v-for="item in formFormatData.formData.giftorder"
                            :key="item.id"
                            :label="item.name"
                            :value="item.id"
                          >
                          </el-option>
                        </el-select>
                      </div>
                    </el-form-item>
                    <el-form-item
                      label=""
                      label-width="0"
                      v-if="this.transport_type==10 || this.transport_type==50"
                    >
                      <div style="display:flex;">
                        <div>
                          选择门店：
                        </div>
                        <div>
                          <el-select
                            v-model="formFormatData.formData.store_id"
                            placeholder="请选择门店"
                          >
                            <el-option
                              v-for="item in storeidData"
                              :key="item.id"
                              :label="item.name"
                              :value="item.id"
                            >
                            </el-option>
                          </el-select>
                        </div>
                      </div>
                    </el-form-item>

                    <el-table
                      :data="verificationData"
                      style="width: 100%"
                      @selection-change="verificationSelectionChange"
                    >
                      <el-table-column
                        :selectable='selectable'
                        type="selection"
                        width="55"
                      >
                      </el-table-column>
                      <el-table-column label="核销码">
                        <template slot-scope="scope">
                         
                            <div style="display: flex;align-items:center;">
                    <div  v-if="scope.row.check_status==0">{{scope.row.code}}</div>
                    <div v-if="scope.row.is_give==1">(赠送)</div>
                  </div>
                        </template>
                      </el-table-column>
                      <el-table-column label="商品">
                        <template
                          slot-scope="scope"
                          v-if="scope.row.goods"
                        >
                          <span>{{scope.row.goods.goods_name}}</span>
                        </template>
                      </el-table-column>
                      <el-table-column label="状态">
                        <template slot-scope="scope">
                          <span
                            v-if="scope.row.check_status==1"
                            class="orders-gray"
                          >已核销</span>
                          <span
                            v-if="scope.row.check_status==0"
                            class="orders-green"
                          >未核销</span>
                        </template>
                      </el-table-column>
                    </el-table>
                  </template>
                  <template v-if="formType === '3-1'">
                    <!-- <el-form-item label="过期时间">
                                        <span v-if="Array.isArray(verificationData) && verificationData.length > 0">{{verificationData[0]['end_time'] | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
                                    </el-form-item> -->
                    <el-form-item label="修改过期时间">
                      <el-date-picker
                        value-format="timestamp"
                        v-model="formFormatData.formData.edit_time"
                        type="datetime"
                        placeholder="选择日期时间"
                      >
                      </el-date-picker>
                    </el-form-item>
                    <el-form-item label="适用范围">
                      <el-radio-group v-model="formFormatData.formData.type">
                        <el-radio label="1">仅本订单</el-radio>
                        <el-radio label="2">同商品所有订单</el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </template>
                  <template v-if="formType === '4'">
                    <el-form-item label="订单金额">
                      <el-input v-model.trim="formFormatData.formData.update_price">
                      </el-input>
                    </el-form-item>
                    <el-form-item
                      label="运费金额"
                      v-if="isExpress"
                    >
                      <el-input v-model.trim="formFormatData.formData.update_express_price">
                      </el-input>
                    </el-form-item>
                  </template>
                  <template v-if="formType === '5'">
                    <el-form-item label="是否退款">
                      <el-radio-group v-model="formFormatData.formData.refund_type">
                        <el-radio label="1">直接退款</el-radio>
                        <el-radio
                          label="2"
                          :disabled="is_abnormal==1?true:false"
                        >自定义</el-radio>
                      </el-radio-group>
                    </el-form-item>
                    <el-form-item
                      label="订单退款处退款方式"
                      v-if="formFormatData.formData.refund_root"
                    >
                      <el-radio-group
                        v-model="formFormatData.formData.refund_root"
                        style="margin-left:20px;"
                      >
                        <el-radio label="1">退款至余额</el-radio>
                        <el-radio label="2">原路返回</el-radio>
                        <el-radio label="3">默认</el-radio>
                      </el-radio-group>
                    </el-form-item>
                    <el-form-item
                      label="自定义退款金额"
                      v-if="formFormatData.formData.refund_type=='2'"
                    >
                      <el-input
                        v-model.trim="formFormatData.formData.refund_money"
                        :disabled="is_abnormal==1?true:false"
                      >
                      </el-input>
                    </el-form-item>
                    
                        <el-form-item
                      label="追回佣金"
                      v-if="dealer_settled!=null||is_ticket==1"
                    >
                      <el-radio-group
                        v-model="formFormatData.formData.recover"
                        style="margin-left:20px;"
                      >
                        <el-radio label="1">是</el-radio>
                        <el-radio label="2">否</el-radio>
                      </el-radio-group>
                      <!-- <div class="form-help">注：立即到账才能追回佣金</div> -->
                    </el-form-item>
                      <el-form-item
                      label="佣金追回比列"
                      v-if="is_ticket==1"
                    >
                    <el-input v-model="formFormatData.formData.proportion" style="width:100px;"> </el-input>
                    <div class="form-help">注：列如"2/3",请务必按照格式填写！不填则全部追回</div>
                    </el-form-item>
                     <el-form-item
                      label="退款原因"
                    >
                      <el-input
                        type="textarea"
                        :rows="2"
                        v-model.trim="formFormatData.formData.refund_content"
                      >
                      </el-input>
                    </el-form-item>
                     <el-table
                      :data="verificationData"
                      style="width: 100%"
                       v-if="dealer_settled!=null && express_type_data==3"
                    >
                      <!-- <el-table-column
                        :selectable='selectable'
                        type="selection"
                        width="55"
                      >
                      </el-table-column> -->
                      <el-table-column label="核销码">
                        <template slot-scope="scope">
                          <span v-if="scope.row.check_status==0">{{scope.row.code}}</span>
                        </template>
                      </el-table-column>
                       <el-table-column label="状态">
                        <template slot-scope="scope">
                          <span
                            v-if="scope.row.check_status==1"
                            class="orders-gray"
                          >已核销</span>
                          <span
                            v-if="scope.row.check_status==0"
                            class="orders-green"
                          >未核销</span>
                        </template>
                      </el-table-column>
                          <el-table-column label="预计追回佣金">
                        <template slot-scope="scope">
                          <span v-if="scope.row.check_status==0">{{scope.row.dealer_money}}</span>
                        </template>
                      </el-table-column>
                     </el-table>
                  </template>
                </el-form>
              </div>
            </div>
          </div>
        </el-scrollbar>
      </div>
      <footer class="flex-row  flex-justify-c flex-align-c wlm-dialog-fixfooter">
        <el-button
          size="small"
          type="primary"
          @click="determineBtn(formFormatData)"
        >确定</el-button>
      </footer>
    </el-dialog>
    <el-dialog
      :visible.sync="dialogVisibleImg"
      width="30%"
      @close="clearData"
      custom-class="reset-pwd wlm-form-dialog dialog-table"
    >
      <div
        class="wlm-form"
        v-if="dialogVisibleImg"
      >
        <div class="wlm-form-header wlm-dialog-fixheader">
          <span class="wlm-dialog-inlenr">标记</span>
        </div>
        <el-scrollbar wrap-class="scrollbar-wrapper">
          <div class="wlm-form-content">
            <div class="wlm-dialog-main">
              <div class="wlm-dialog-content">
                <el-form
                  ref="userForm"
                  :model="moniForm"
                  size="small"
                  label-width="120px"
                  class="retail-form"
                  label-position="right"
                >
                  <el-form-item label="标记">
                    <el-radio-group v-model="historyColor">
                      <el-radio label="red">
                        <svg-icon
                          icon-class="qisan"
                          class="qi-svg red"
                        />
                      </el-radio>
                      <el-radio label="yellow">
                        <svg-icon
                          icon-class="qisan"
                          class="qi-svg yellow"
                        />
                      </el-radio>
                      <el-radio label="green">
                        <svg-icon
                          icon-class="qisan"
                          class="qi-svg green"
                        />
                      </el-radio>
                      <el-radio label="blue">
                        <svg-icon
                          icon-class="qisan"
                          class="qi-svg blue"
                        />
                      </el-radio>
                      <el-radio label="purple">
                        <svg-icon
                          icon-class="qisan"
                          class="qi-svg purple"
                        />
                      </el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <el-form-item label="标记信息">
                    <el-input
                      type="textarea"
                      :autosize="{ minRows: 4, maxRows: 4}"
                      v-model="historyRemark"
                    >
                    </el-input>
                  </el-form-item>
                </el-form>
              </div>
            </div>
          </div>
        </el-scrollbar>
      </div>
      <footer class="flex-row flex-align-c flex-justify-c wlm-dialog-fixfooter">
        <el-button
          size="small"
          @click="dialogVisibleImg=false"
        >关闭</el-button>
        <el-button
          size="small"
          type="primary"
          @click="saveDialog"
        >确定</el-button>
      </footer>
    </el-dialog>
    <el-dialog
      :visible.sync="dialogVisibleYg"
      width="40%"
      @close="clearDataYg"
      custom-class="reset-pwd wlm-form-dialog dialog-table"
    >
      <div
        class="wlm-form"
        v-if="dialogVisibleYg"
      >
        <div class="wlm-form-header wlm-dialog-fixheader">
          <span class="wlm-dialog-inlenr">佣金数据</span>
        </div>
        <el-scrollbar wrap-class="scrollbar-wrapper">
          <div class="wlm-form-content">
            <div class="wlm-dialog-main">
              <div class="wlm-dialog-content">
                <el-form
                  ref="userForm"
                  :model="formFormatData.formData"
                  :rules="formFormatData.rules"
                  size="small"
                  label-width="120px"
                  class="retail-form"
                  label-position="right"
                >
                  <el-form-item
                    label="一级分销商"
                    prop="name"
                    v-if="ygData.first_user_name"
                  >
                    <div
                      class="flex-row"
                      style="margin-left:40px;"
                    >
                      <span>用户：</span>
                      <div class="flex-col">
                        <p style="min-width:120px;">{{ygData.first_user_name}}</p>
                        <span>id：{{ygData.first_user_id}}</span>
                      </div>
                      <span style="margin-left:10px;">分销佣金：</span>
                      <el-input v-model="ygData.first_money"></el-input>
                    </div>
                  </el-form-item>
                  <el-form-item
                    label="二级分销商"
                    prop="merchantlog"
                    v-if="ygData.second_user_name"
                  >
                    <div
                      class="flex-row"
                      style="margin-left:40px;"
                    >
                      <span>用户：</span>
                      <div class="flex-col">
                        <p style="min-width:120px;">{{ygData.second_user_name}}</p>
                        <span>id：{{ygData.second_user_id}}</span>
                      </div>
                      <span style="margin-left:10px;">分销佣金：</span>
                      <el-input v-model="ygData.second_money"></el-input>
                    </div>
                  </el-form-item>
                  <el-form-item
                    label="三级分销商"
                    prop="businessbackgroundmap"
                    v-if="ygData.third_user_name"
                  >
                    <div
                      class="flex-row"
                      style="margin-left:40px;"
                    >
                      <span>用户：</span>
                      <div class="flex-col">
                        <p style="min-width:120px;">{{ygData.third_user_name}}</p>
                        <span>id：{{ygData.third_user_id}}</span>
                      </div>
                      <span style="margin-left:10px;">分销佣金：</span>
                      <el-input v-model="ygData.third_money"></el-input>
                    </div>
                  </el-form-item>
                </el-form>
              </div>
            </div>
          </div>
        </el-scrollbar>
      </div>
      <footer class="flex-row flex-align-c flex-justify-c wlm-dialog-fixfooter">
        <el-button
          size="small"
          @click="dialogVisibleYg=false"
        >关闭</el-button>
        <el-button
          size="small"
          type="primary"
          @click="saveDialogYg"
        >确定</el-button>
      </footer>
    </el-dialog>
        <el-dialog
      :visible.sync="clearDataSQTK"
      width="40%"
      custom-class="reset-pwd wlm-form-dialog dialog-table"
    >
      <div
        class="wlm-form"
        v-if="clearDataSQTK"
      >
        <div class="wlm-form-header wlm-dialog-fixheader">
          <span class="wlm-dialog-inlenr">申请退款(请确定退款核销码，未核销或者未退款;如果是一码多票制，请在申请退款数量填写退款数量)</span>
        </div>
          <el-table
                      :data="verificationDataSQTK"
                      style="width: 100%"
                      @selection-change="handleSelectionChangeSQTK"
                    >
                       <el-table-column type="selection" width="55"></el-table-column>
                      <el-table-column label="核销码">
                        <template slot-scope="scope">
                          <span v-for="(item,index) in scope.row.code" :key="index">
                            {{item}}
                             
                          </span>
                        </template>
                      </el-table-column>
                       <el-table-column label="申请退款数量">
                                  <template slot-scope="scope">
                                      <el-input-number :controls="false" v-model="scope.row.count" ></el-input-number>

                                  </template>
                            </el-table-column>
                        
                     </el-table>
                     <footer class="flex-row flex-align-c flex-justify-c wlm-dialog-fixfooter">
        <el-button
          size="small"
          @click="clearDataSQTK=false"
        >关闭</el-button>
        <el-button
          size="small"
          type="primary"
          @click="saveDialogSQTK"
        >确定</el-button>
      </footer>
      </div>
        </el-dialog>
    <div
      class="wlm-table"
      v-loading="loading"
    >
      <div class="wlm-table-header">
        <el-form
          :model="tableFormatData.announcement.files"
          size="small"
          label-width="114px"
          class="retail-form"
          label-position="right"
        >
          <el-form-item
            label=""
            class="filter"
          >
            <el-form-item
              label="订单搜索："
              class="filter"
            >
              <el-select
                v-model="tableFormatData.announcement.files.keytype"
                placeholder="请选择"
                style="width:140px;"
              >
                <el-option
                  :label="'订单编号'"
                  value="order_no"
                >
                </el-option>
                <el-option
                  :label="'支付单号'"
                  value="transaction_id"
                >
                </el-option>
                <el-option
                  :label="'商品名称'"
                  value="goods_name"
                >
                </el-option>
                <el-option
                  :label="'买家姓名'"
                  value="name"
                >
                </el-option>
                <el-option
                  :label="'买家电话'"
                  value="phone"
                >
                </el-option>
                <el-option
                  :label="'购物车单号'"
                  value="cart_order_no"
                >
                </el-option>
                <el-option
                  :label="'商家名称'"
                  value="merchant_name"
                >
                </el-option>
                <el-option
                  :label="'用户昵称'"
                  value="nick_name"
                >
                </el-option>
                <el-option
                  v-if="isVerification"
                  label="订单核销码"
                  value="order_code"
                >
                </el-option>
                <el-option
                  v-if="isCardPassword"
                  label="卡密信息"
                  value="kam_code"
                >
                </el-option>
                <!-- <el-option v-if="isVerification||isComeStore" :label="'核销门店'" value="store_name">
                            </el-option> -->
                <!-- <el-option v-if="isVerification||isComeStore" :label="'核销人员'" value="store_user">
                            </el-option> -->
              </el-select>
              <div class="flex-col">
                <el-input
                  v-model="tableFormatData.announcement.files.keyword"
                  placeholder="请输入搜索内容"
                  style="width:200px;margin-left:20px;"
                ></el-input>
                <!-- <p v-if="tableFormatData.announcement.files.keytype=='kam_code'" style="margin-left:20px;" class="orders-gray">目前只支持搜索数字</p> -->
              </div>
            </el-form-item>
            <el-form-item label="订单类型：" v-if="!Ticketing">
              <el-select
                v-model="tableFormatData.announcement.files.order_type"
                placeholder="请选择"
                style="width:155px;"
              >
                <el-option
                  :label="'全部'"
                  value="all"
                >
                </el-option>
                <el-option
                  :label="'普通订单'"
                  value="1"
                >
                </el-option>
                <el-option
                  :label="'拼团订单'"
                  value="2"
                >
                </el-option>
                <el-option
                  :label="'秒杀订单'"
                  value="3"
                >
                </el-option>
                <el-option
                  :label="'砍价订单'"
                  value="5"
                >
                </el-option>
              </el-select>
            </el-form-item>
             <el-form-item label="票务类型：" v-else>
               <el-select
                v-model="tableFormatData.announcement.files.ticket_type"
                placeholder="请选择"
                style="width:155px;"
              >
                <el-option
                  :label="'全部'"
                  value=""
                >
                </el-option>
                 <el-option
                  :label="'自我游'"
                  value="1"
                >
                </el-option>
                 <el-option
                  :label="'天时同城'"
                  value="2"
                >
                </el-option>
                 <el-option
                  :label="'银科环企'"
                  value="3"
                >
                </el-option>
                 <el-option
                  :label="'票付通'"
                  value="4"
                >
                </el-option>
               </el-select>
            </el-form-item>
            <el-form-item label="付款方式：" >
              <el-select
                v-model="tableFormatData.announcement.files.pay_type"
                placeholder="请选择"
                style="width:155px;"
              >
                <el-option
                  :label="'全部'"
                  value=""
                >
                </el-option>
                <el-option
                  :label="'余额支付'"
                  value="balance"
                >
                </el-option>
                <el-option
                  :label="'微信支付'"
                  value="wechat"
                >
                </el-option>
                <el-option
                  :label="'支付宝支付'"
                  value="alipay"
                >
                </el-option>
                <el-option
                  :label="'后台支付'"
                  value="admin"
                >
                </el-option>
              </el-select>
            </el-form-item>
           
          </el-form-item>
          <el-form-item
            label=""
            class="filter"
          >
            <el-form-item label="下单时间：">
              <el-date-picker
                style="width:360px;margin-right:0;"
                v-model="tableFormatData.announcement.files.time"
                :picker-options="pickerOptions"
                value-format="timestamp"
                type="datetimerange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                :default-time="['00:00:00', '23:59:59']"
              >
              </el-date-picker>
            </el-form-item>
            <el-form-item label="订单来源：">
              <el-select
                v-model="tableFormatData.announcement.files.source"
                placeholder="请选择"
                style="width:155px;"
              >
                <el-option
                  :label="'全部'"
                  value=""
                >
                </el-option>
                <!-- <el-option :label="'导入'" :value="1">
                            </el-option> -->
                <el-option
                  :label="'微信小程序'"
                  :value="2"
                >
                </el-option>
                <el-option
                  :label="'H5'"
                  :value="3"
                >
                </el-option>
                <el-option
                  :label="'微信公众号'"
                  :value="4"
                >
                </el-option>
                 <el-option
                  :label="'字节跳动'"
                  :value="9"
                >
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item
              label="售后状态："
              v-if="!isCardPassword"
            >
              <el-select
                v-model="tableFormatData.announcement.files.after_sale_status"
                placeholder="请选择"
                style="width:155px;"
              >
                <el-option
                  :label="'全部'"
                  value=""
                >
                </el-option>
                <el-option
                  :label="'进行中'"
                  :value="1"
                >
                </el-option>
                <el-option
                  :label="'已拒绝'"
                  :value="2"
                >
                </el-option>
                <el-option
                  :label="'已完成'"
                  :value="3"
                >
                </el-option>
                <el-option
                  :label="'已取消'"
                  :value="4"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-form-item>
          <el-form-item
            label=""
            class="filter-btns"
          >
            <el-button
              type="primary"
              @click="filesSerch"
            >筛选</el-button>
            <el-button
              :disabled="tableFormatData.announcement.tableData.length==0"
              plain
              icon="document"
              :data-query="JSON.stringify(tableFormatData.announcement.files)"
              v-exceldown="{path:'orderOutput&',query: {}}"
              v-if="tableFormatData.announcement.files.is_ticket!=1"
            >{{$t('excel.export') }}</el-button>
            <el-button
              type="text"
              @click="filesEmpty"
            >清空筛选条件</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div class="wlm-table-content">
        <el-tabs
          v-model="tableFormatData.announcement.files.order_status"
          type="card"
          @tab-click="filesSerch"
        >
          <!-- @tab-click="filesSerch" -->
            <el-tab-pane
            label="全部订单"
            name="0"
          ></el-tab-pane>
          <el-tab-pane
            label="待付款"
            name="1"
          ></el-tab-pane>
          <template v-if="isVerification">
            <el-tab-pane
              label="待核销"
              name="2"
            ></el-tab-pane>
            <el-tab-pane
              label="已完成"
              name="3"
            ></el-tab-pane>
            <el-tab-pane
              label="已过期"
              name="4"
            ></el-tab-pane>
            <el-tab-pane
              label="已关闭"
              name="5"
            ></el-tab-pane>
          </template>
          <template v-if="isComeStore">
            <el-tab-pane
              label="待自提"
              name="2"
            ></el-tab-pane>
            <el-tab-pane
              label="已完成"
              name="3"
            ></el-tab-pane>
            <el-tab-pane
              label="已关闭"
              name="4"
            ></el-tab-pane>
          </template>
          <template v-if="isExpress">
            <el-tab-pane
              label="待发货"
              name="2"
            ></el-tab-pane>
            <el-tab-pane
              label="待收货"
              name="3"
            ></el-tab-pane>
            <el-tab-pane
              label="已完成"
              name="4"
            ></el-tab-pane>
            <el-tab-pane
              label="已关闭"
              name="5"
            ></el-tab-pane>
          </template>
          <template v-if="isCardPassword">
            <el-tab-pane
              label="已完成"
              name="4"
            ></el-tab-pane>
          </template>
          <template v-if="isGroup">
            <el-tab-pane
              label="已完成"
              name="4"
            ></el-tab-pane>
          </template>
          <template v-if="Ticketing">
              <el-tab-pane
            label="已完成"
            name="3"
          ></el-tab-pane>
            <el-tab-pane
            label="待核销"
            name="2"
          ></el-tab-pane>
            <el-tab-pane
            label="下单失败"
            name="6"
          ></el-tab-pane>
          </template>
        </el-tabs>
        <el-table
          :ref="tableFormatData.announcement.key"
          :data="$tableDataFilter"
          @selection-change="handleSelectionChange"
          style="width: 100%;"
        >
          <el-table-column
            align="left"
            class-name="no-column"
          >
            <el-table-column
              width="30"
              class-name="no-bor"
            >
            </el-table-column>
            <el-table-column
              label="商品信息"
              align="left"
              class-name="no-bor"
            >
              <template slot-scope="scope">
                <div
                  class="flex-row  mar-col goods-list"
                  v-for="(item, index) in scope.row.goods"
                  :key="index"
                >
                  <img
                    v-if="item.image"
                    width="50"
                    height="50"
                    :src="item.image.file_path"
                    style="margin-right:10px;"
                  >
                  <el-popover
                    class="scale-grow"
                    placement="top-start"
                    width="200"
                    trigger="hover"
                    :content="item.goods_name"
                  >
                    <p
                      slot="reference"
                      class="ellips_line2"
                    >{{ item.goods_name }}</p>
                  </el-popover>
                </div>
                <div
                  class="flex-row "
                  style="background:rgb(235, 238, 245);position: absolute;top: 0;left: -30px;right: -9999px;padding: 12px;"
                >
                  <div
                    v-if="scope.row.is_rebate== 1"
                    class="vip-img-icon"
                  >会员</div>
                  <!-- <img v-if="scope.row.total_money!= 0" src="../../assets/vip_card/orderVipIcon.png" height="25" width="50" style="margin-left: 10px;" alt=""> -->
                  <div
                    v-if="scope.row.is_rebate!= 1"
                    style="width:22px;height:1px"
                  ></div>
                  <span
                    class="no-nowrap"
                    style="margin-left: 5px;height:22px;"
                  >
                    订单编号:{{scope.row.order_no}}
                    <el-tag
                      style="width: 36px;font-size:12px;"
                      size="mini"
                      v-if="scope.row.order_type!=1&&scope.row.order_type!=4"
                    >
                      {{scope.row.order_type==2?'拼团':scope.row.order_type==3?'秒杀':scope.row.order_type==5?'砍价':scope.row.order_type==7?'免单':''}}</el-tag>
                    <el-tag
                      type="warning"
                      v-if="scope.row.is_abnormal==1"
                    >异常订单</el-tag>
                  </span>
                  <span
                    class="no-nowrap"
                    style="margin-left: 5px;height:22px;z-index:99"
                    v-if="scope.row.cart_order_id && scope.row.no"
                  >
                    <span style="margin-left: 10px;height:22px;">购物车ID:{{scope.row.cart_order_id}}</span>
                    <span style="margin-left: 10px;height:22px;">购物车单号:{{scope.row.no}}</span>
                  </span>
                  <span v-if="scope.row.paytype_text.text=='微信'" style="z-index:99">
                    <span  style="margin-left: 10px;height:22px;">交易单号:{{scope.row.transaction_id}}</span>
                  </span>
                  <!-- 是票务订单并且是银科环企订单展示 -->
                    <span v-if="tableFormatData.announcement.files.is_ticket==1 && (scope.row.ticket_type==3||scope.row.ticket_type==4)" style="z-index:99">
                        <span style="margin-left: 10px;height:22px;" >已核销数量:{{scope.row.order_num}}</span>
                        <span style="margin-left: 10px;height:22px;" >已退款数量:{{scope.row.refund_num}}</span>
                    </span>
                    
                </div>
                <div
                  class="flex-row"
                  style="border-top:1px solid rgb(235,238,245);background: rgb(250, 250, 250);position: absolute;bottom: 0;left: -30px;right: -9999px;padding: 12px;z-index:1"
                >
                  <p
                    class="no-nowrap scale-grow"
                    style="margin-left: 27px;height:22px;"
                    v-if="scope.row.express_type==5"
                  >供应商名称:<span class="order-blue">{{scope.row.reg_order.supplier && scope.row.reg_order.supplier.name?scope.row.reg_order.supplier.name :'无'}}</span>

                  </p>
                  <p
                    v-else
                    class="no-nowrap scale-grow"
                    style="margin-left: 27px;height:22px;"
                  >商户名称:<span class="order-blue">{{scope.row.bus_name}}</span>
                    <span v-if="scope.row.first_user_name&&scope.row.is_refund != 30&&scope.row.pay_status.value == 20">
                      <span v-if="scope.row.dealer_leave">分销订单级别：{{scope.row.dealer_leave}}级</span>
                      <span v-if="scope.row.dealer_money">分销佣金：{{scope.row.dealer_money}} 元</span>
                    </span>
                  </p>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              label="单价/数量"
              class-name="no-bor"
            >
              <template
                slot-scope="scope"
                class=""
              >
                <div
                  class="flex-col  goods-list"
                  v-for="(item, index) in scope.row.goods"
                  :key="index"
                >
                  <p><span class="orders-red">￥</span>{{item.goods_price}}</p>
                  <p>{{item.total_num || 0}}件</p>
                </div>
              </template>
            </el-table-column>
            <el-table-column
              label="售后"
              min-width="40"
              v-if="!isCardPassword"
            >
              <template slot-scope="scope">
                <div
                  class="flex-col  goods-list"
                  v-for="(item, index) in scope.row.goods"
                  :key="index"
                >
                  <template v-if="item.refund">
                    <span>{{afterNewStatus[`${item.refund.status}`]}}</span>
                    <router-link
                      tag="span"
                      :to="{path:'/orders/afterSale', query:{order_id:item.order_id}}"
                    >
                      <el-button
                        class="orders-red"
                        type="text"
                      >售后</el-button>
                    </router-link>
                  </template>
                  <template v-if="!item.refund">
                    <span>-</span>
                  </template>
                </div>
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column
            prop="date"
            label="实付款/订单来源"
          >
            <template slot-scope="scope">
              <div class="flex-col  pad-t-50 pad-b-50">
                <p v-if="scope.row.member_card_price">
                  会员卡费用：<span class="orders-red">￥</span>{{scope.row.member_card_price}}</p>
                <p><span class="orders-red">￥</span>{{scope.row.pay_price}}</p>
                <p v-if="scope.row.express_type==1"><span class="orders-gray font-12">运费{{`${scope.row.express_price}元`}}</span></p>
                <el-tooltip
                  class="item"
                  effect="dark"
                  :content="sourceType[`${scope.row.source}`]"
                  placement="top"
                >
                  <img
                    height="20"
                    width="20"
                    :src="sourceImg[`${scope.row.source || '--'}`]"
                    alt=""
                  >
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="date"
            label="用户"
          >
            <template slot-scope="scope">
              <div
                v-if="scope.row.order_no=='S1234567890'"
                class="flex-col  pad-t-50 pad-b-50"
              >
                <span>模拟用户</span>
              </div>
              <div
                v-if="scope.row.order_no!='S1234567890'"
                class="flex-col  pad-t-50 pad-b-50"
              >
                <template v-if="(scope.row.express_type == '1'|| scope.row.express_type == '5' )&& !!scope.row.address">
                  <p>
                    <router-link
                      tag="span"
                      :to="{path:'/user/managementUserEdit', query:{user_id:scope.row.address.user_id}}"
                    >
                      <el-button
                        type="text"
                        v-if="scope.row.user"
                      >{{scope.row.user.nickName}}</el-button>
                    </router-link>
                  </p>
                  <!-- <p>{{`${scope.row.address.name}` }}</p> -->
                  <p>{{`${!!scope.row.name ? scope.row.name:scope.row.address.name}`}}</p>
                  <p>{{`${scope.row.address.phone || '-'}`}}</p>
                </template>
                <template v-if="scope.row.express_type == '2' && !!scope.row.store">
                  <p>
                    <router-link
                      tag="span"
                      :to="{path:'/user/managementUserEdit', query:{user_id:scope.row.store.user_id}}"
                    >
                      <el-button
                        type="text"
                        v-if="scope.row.user"
                      >{{scope.row.user.nickName}}</el-button>
                    </router-link>
                  </p>
                  <p>{{`${scope.row.goods[0]['name']}`}}</p>
                  <p>{{`${scope.row.store.phone || '-'}`}}</p>
                </template>
                <template v-if="scope.row.express_type == '3' && Array.isArray(scope.row.goods) && scope.row.goods[0]">
                  <p>
                    <router-link
                      tag="span"
                      :to="{path:'/user/managementUserEdit', query:{user_id:scope.row.goods[0].user_id}}"
                    >
                      <el-button
                        type="text"
                        v-if="scope.row.user"
                      >{{scope.row.user.nickName}}</el-button>
                    </router-link>
                  </p>
                  <p>{{`${scope.row.goods[0]['name']}`}}</p>
                  <p>{{`${scope.row.goods[0].mobile || '-'}`}}</p>
                </template>
                <template v-if="scope.row.express_type == '4' && Array.isArray(scope.row.goods) && scope.row.goods[0]">
                  <p>
                    <router-link
                      tag="span"
                      :to="{path:'/user/managementUserEdit', query:{user_id:scope.row.goods[0].user_id}}"
                    >
                      <el-button
                        type="text"
                        v-if="scope.row.name"
                      >{{scope.row.name}}</el-button>
                    </router-link>
                  </p>
                  <p>{{scope.row.mobile}}</p>
                </template>
                <!-- <template v-if="scope.row.express_type == '5' && Array.isArray(scope.row.goods) && scope.row.goods[0]">
                  <p>
                    <router-link tag="span" :to="{path:'/user/managementUserEdit', query:{user_id:scope.row.goods[0].user_id}}">
                      <el-button type="text" v-if="scope.row.name">{{scope.row.name}}</el-button>
                    </router-link>
                  </p>
                  <p>{{scope.row.mobile}}</p>
                </template> -->
              </div>
            </template>
          </el-table-column>
           <el-table-column
            prop="date"
            label="用户下单信息"
             v-if="tableFormatData.announcement.files.is_ticket==1"
          >
              <template slot-scope="scope">
                <div v-if="scope.row.fields&&!!scope.row.fields" class="flex-col pad-t-50 pad-b-50">
                  <div v-for="(item,index) in scope.row.fields" :key="index">
                    <div>{{item.link_man}}</div>
                    <div>{{item.link_phone}}</div>
                  </div>
                </div> 
              </template>
            </el-table-column>
          <el-table-column
            prop="date"
            label="下单时间"
          >
            <template slot-scope="scope">
              <div class="flex-col  pad-t-50 pad-b-50">
                <span>{{scope.row.create_time}}</span>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="date"
            label="消费/支付方式"
          >
            <template slot-scope="scope">
              <div class="flex-row">
                <div class="flex-col  pad-t-50 pad-b-50">
                  <div class="opacity-0">
                    <span></span>
                  </div>
                  <div class="flex-col flex-justify-c ">
                    <!-- <span class="mar-col">{{scope.row.express_type==2?'自提':
                      (scope.row.express_type==1?'快递':
                      (scope.row.express_type==4?'卡密':
                      scope.row.express_type==5?'团购':'核销'))}}</span> -->
                    <span v-if="scope.row.express_type==1 && scope.row.is_ticket!=1">快递</span>
                    <span v-if="scope.row.express_type==2 && scope.row.is_ticket!=1">自提</span>
                    <span v-if="scope.row.express_type==3 && scope.row.is_ticket!=1">核销</span>
                    <span v-if="scope.row.express_type==4 && scope.row.is_ticket!=1">卡密</span>
                    <span v-if="scope.row.express_type==5 && scope.row.is_ticket!=1">团购</span>
                    <span v-if="scope.row.is_ticket==1">票务</span>
                    <span
                      class="mar-col"
                      v-if="scope.row.pay_status.value !== 10"
                    >{{`${scope.row.paytype_text.text||'-'}`}}</span>
                    <span
                      class="mar-col"
                      v-if="scope.row.pay_status.value === 10"
                    >-</span>
                    <!-- <el-button size="small" type="primary" @click="dialogRefund = true">确认退款</el-button> -->
                  </div>
                </div>
                <el-scrollbar
                  v-if="isCardPassword"
                  class="pad-t-50 pad-b-50"
                  style="width:150px;height: 150px;max-height: 150px;margin-left:10px;"
                >
                  <div
                    v-for="(item, index) in scope.row.key.data"
                    :key="index"
                    class="kami-box"
                  >
                    <p
                      class="kami-box-item"
                      style="font-weight:600"
                    >卡密{{index+1}}：</p>
                    <div
                      v-for="(citem, cindex) in item"
                      :key="cindex"
                    >
                      <p class="kami-box-item">{{citem.key}}：{{citem.value}}</p>
                    </div>
                    <div
                      v-if="scope.row.key.data.length!=(index+1)"
                      class="kami-line"
                    ></div>
                  </div>
                </el-scrollbar>
              </div>
            </template>
          </el-table-column>
           
          <el-table-column
            prop="date"
            label="状态"
            v-if="tableFormatData.announcement.files.is_ticket==1"
          >
            <template slot-scope="scope">
              <div class="flex-col  pad-t-50 pad-b-50">
                <span v-if="scope.row.ticket_type==1">自我游</span>
                <span v-if="scope.row.ticket_type==2">天时同城</span>
                <span v-if="scope.row.ticket_type==3">银科环企</span>
                <span v-if="scope.row.ticket_type==4">票付通</span>
                <span v-if="scope.row.is_generate_order==1">下单成功</span>
                <span v-if="scope.row.is_generate_order==2">未下单</span>
                <div v-if="scope.row.is_generate_order==1">
                  <el-tag
                    type="success"
                    v-if="scope.row.is_ticket_pay==1"
                  >已支付</el-tag>
                  <el-tag
                    type="danger"
                    v-if="scope.row.is_ticket_pay==2"
                  >未支付</el-tag>
                   <div v-if="scope.row.submit_refund==1">已申请退款</div>
                   <div v-if="scope.row.ticket_is_refund==2">未通过申请</div>
                   <!-- <div v-if="scope.row.ticket_is_refund==1"></div> -->
                </div>

              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="date"
            label="同步信息"
            v-if="tableFormatData.announcement.files.is_ticket==1"
          >
            <template slot-scope="scope">
              <div class="flex-col  pad-t-50 pad-b-50">
                <span>{{scope.row.syn_info?scope.row.syn_info:''}}</span>
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="address"
            min-width="100"
            label="状态/操作"
          >
            <template slot-scope="scope">
              <!-- is_ticket！=1时 就走之前的，==1时 就是票务相关的操作 -->
              <div
                class="flex-col  pad-t-50 pad-b-50"
                v-if="tableFormatData.announcement.files.is_ticket!=1"
              >
                <div
                  style="position: absolute;right: 15px;top:5px;"
                  v-if="scope.row.user"
                >
                  <el-button
                    type="text"
                    @click="repairbtn(scope.row.order_id)"
                    v-if="scope.row.state_text !='已完成' && scope.row.is_abnormal!=1"
                  >修复订单</el-button>
                  <el-tooltip
                    class="item"
                    effect="dark"
                    content="标记"
                    placement="top"
                  >
                    <span @click="openDialog(scope.row.admin_remark.color,scope.row.admin_remark.remark,scope.row.order_id)">
                      <svg-icon
                        icon-class="qisan"
                        :class="['qi-svg',scope.row.admin_remark.color]"
                      />
                    </span>
                  </el-tooltip>

                  <router-link
                    class="wlm-text"
                    tag="span"
                    :to="{path:`${linkDetail}`, query:{order_id:scope.row.order_id,nickName:scope.row.user.nickName,user_id:scope.row.user.user_id}}"
                  >
                    <el-button type="text">查看订单</el-button>
                  </router-link>
                </div>
                <div
                  class="flex-row flex-align-c"
                  style="position: absolute;right: 15px;bottom:5px;white-space: nowrap;z-index:1"
                >
                  <!--is_refund 10未申请 20已申请 30已完成   申请退款
                    pay_status.value  10未付款 20已付款   付款状态
                                      -->
                  <div
                    class="flex-row"
                    v-if="scope.row.is_refund != 30&&scope.row.pay_status.value == 20"
                  >
                    <!-- <div style="margin-right:10px;" v-if="scope.row.first_user_name">1级佣金：{{scope.row.first_user_name}}(mid:{{scope.row.first_user_id}}) {{scope.row.first_money}} 元</div>
                    <div style="margin-right:10px;" v-if="scope.row.second_user_name">2级佣金：{{scope.row.second_user_name}}(mid:{{scope.row.second_user_id}}) {{scope.row.second_money}} 元</div>
                    <div style="margin-right:10px;" v-if="scope.row.third_user_name">3级佣金：{{scope.row.third_user_name}}(mid:{{scope.row.third_user_id}}) {{scope.row.third_money}} 元</div> -->
                    <div
                      style="margin-right:10px;"
                      v-if="scope.row.first_user_id"
                    >1级佣金：{{scope.row.first_user_name}}(mid:{{scope.row.first_user_id}}) {{scope.row.first_money}} 元</div>
                    <div
                      style="margin-right:10px;"
                      v-if="scope.row.second_user_id"
                    >2级佣金：{{scope.row.second_user_name}}(mid:{{scope.row.second_user_id}}) {{scope.row.second_money}} 元</div>
                    <div
                      style="margin-right:10px;"
                      v-if="scope.row.third_user_id"
                    >3级佣金：{{scope.row.third_user_name}}(mid:{{scope.row.third_user_id}}) {{scope.row.third_money}} 元</div>
                  </div>
                  <el-button
                    v-if="scope.row.first_user_name&&scope.row.dealer_settled==0"
                    type="text"
                    @click="openDialogYg({order_id:scope.row.order_id,first_user_name:scope.row.first_user_name,first_user_id:scope.row.first_user_id,first_money:scope.row.first_money,second_user_name:scope.row.second_user_name,second_user_id:scope.row.second_user_id,second_money:scope.row.second_money,third_user_name:scope.row.third_user_name,third_user_id:scope.row.third_user_id,third_money:scope.row.third_money})"
                  >修改佣金</el-button>
                </div>

                <el-popover
                  trigger="click"
                  placement="top"
                  v-if="isExpress && scope.row.delivery_status.value=='20' && scope.row.receipt_status.value=='10'"
                >
                  <div
                    class="flex-row flex-align-c"
                    style="margin-bottom:4px;"
                  >
                    <span style="white-space: nowrap; margin-right:8px;">物流公司: </span>
                    <el-input
                      style="width:130px"
                      v-model="scope.row.express_company"
                      @blur="changeTableItem({order_id:scope.row.order_id,express_company:scope.row.express_company,express_no:scope.row.express_no,customerName:scope.row.customerName},tableFormatData.announcement.change.express_data)"
                      size="mini"
                    ></el-input>
                  </div>
                  <div class="flex-row flex-align-c">
                    <span style="white-space: nowrap; margin-right:8px;">物流单号: </span>
                    <el-input
                      v-model="scope.row.express_no"
                      @blur="changeTableItem({order_id:scope.row.order_id,express_company:scope.row.express_company,express_no:scope.row.express_no,customerName:scope.row.customerName},tableFormatData.announcement.change.express_data)"
                      size="mini"
                    ></el-input>
                  </div>
                  <div
                    class="flex-row flex-align-c"
                    style="margin-top:4px;"
                  >
                    <span style="white-space: nowrap; margin-right:8px;">青龙编码: </span>
                    <el-input
                      v-model="scope.row.customerName"
                      @blur="changeTableItem({order_id:scope.row.order_id,express_company:scope.row.express_company,express_no:scope.row.express_no,customerName:scope.row.customerName},tableFormatData.announcement.change.express_data)"
                      size="mini"
                    ></el-input>
                  </div>
                  <div
                    slot="reference"
                    class="name-wrapper"
                  >
                    <el-button
                      type="text"
                      class="pointer"
                    ><span
                        @mousemove="mouseenter(scope, true, 'showEditPriceBtn')"
                        @mouseout="mouseenter(scope, false, 'showEditPriceBtn')"
                      >{{scope.row.express_company}}_{{scope.row.express_no}}</span>
                      <svg-icon
                        v-if="scope.row.showEditPriceBtn"
                        icon-class="editIcon"
                      />
                    </el-button>
                  </div>
                </el-popover>
                <!-- 处理异常订单（is_abnormal=1时是异常订单） -->
                <div v-if="scope.row.is_abnormal!=1">
                  <p>{{scope.row.state_text}}</p>
                  <p v-if="scope.row.recover_commission==1 && scope.row.state_text=='已退款'">佣金已追回</p>
                  <!-- 展示button -->

                  <div
                    class="operation-group flex-row"
                    v-if="scope.row.show_button"
                  >
                    <div
                      style="position: relative;white-space: nowrap;"
                      v-for="(buttonItem, buttonIndex) in filterButtons(scope.row.show_button)"
                      :key="buttonIndex"
                    >
                      <!-- 付款 -->
                      <div
                        class="btn-line"
                        v-if="buttonIndex !== 0 && hasFirst(scope.row.show_button)"
                      ></div>
                      <el-button
                        v-if="buttonItem.value == 1 && buttonItem.event == 'pay'"
                        class="wlm-text"
                        type="text"
                        @click="changeTableItem({order_id:scope.row.order_id},tableFormatData.announcement.change.payorder,{isWarning: true,warning:'商家是否与用户完成了线下付款，否则带来损失商家自付？',cancel:'已取消'})"
                      >{{buttonItem.text}}</el-button>
                      <!-- 核销 自提 发货 -->
                      <el-button
                        v-if="buttonItem.value == 1 && buttonItem.event == 'send' && buttonItem.type == 1"
                        class="wlm-text"
                        type="text"
                        @click="showDialog({formType:'1',params:{id:scope.row.order_id,toggle:'dialogTableVisible',noEdit:true}})"
                      >{{buttonItem.text}}</el-button>
                      <el-button
                        v-if="buttonItem.value == 1 && buttonItem.event == 'send' && buttonItem.type == 2"
                        class="wlm-text"
                        type="text"
                        @click="changeTableItem({order_id:scope.row.order_id},tableFormatData.announcement.change.selfDelery,{isWarning: true,warning:'是否确认自提？',cancel:'已取消'})"
                      >{{buttonItem.text}}</el-button>
                      <el-button
                        v-if="buttonItem.value == 1 && buttonItem.event == 'send' && buttonItem.type == 3"
                        class="wlm-text"
                        type="text"
                        @click="showDialog({formType:'3',params:{id:scope.row.order_id,goods_id:scope.row.goods_id,toggle:'dialogTableVisible',noEdit:true,transport_type:scope.row.goods[0].transport_type,bus_id:scope.row.bus_id}})"
                      >{{buttonItem.text}}</el-button>
                      <!-- 退款按钮 -->
                      <!-- <el-button type="text" v-if="scope.row.pay_status.value==20 && scope.row.order_status!=30"  @click="showDialog({formType:'5',params:{id:scope.row.order_id,toggle:'dialogTableVisible',noEdit:true},dealer_settled:scope.row.dealer_settled,express_type:scope.row.express_type})">退款</el-button> -->
                      <!-- 退款 -->
                      <!--  2021年5月13日16:24:00 处理显示已取消订单，只显示确认核销，应该还要显示退款进行相关操作 -->
                      <el-button
                        v-if="(buttonItem.value == 1 && buttonItem.event == 'refund' )|| scope.row.state_text=='已取消订单'"
                        class="wlm-text"
                        type="text"
                        @click="showDialog({formType:'5',params:{id:scope.row.order_id,toggle:'dialogTableVisible',noEdit:true},dealer_settled:scope.row.dealer_settled,express_type:scope.row.express_type})"
                      >{{scope.row.state_text=='已取消订单'?'退款':buttonItem.text}}</el-button>
                      <el-button
                        v-if="isExpress && scope.row.delivery_status.value=='20' && scope.row.receipt_status.value=='10'"
                        class="wlm-text"
                        type="text"
                        @click="receivingbtn(scope.row.order_id)"
                      >确认收货</el-button>
                      <!-- <span
                      v-if="buttonItem.value == 1 && scope.row.order_status == 30 && scope.row.express_type == 5"
                      class="wlm-text"
                      type="text"
                    >已完成</span> -->
                      <!-- <el-button v-if="buttonItem.value == 1 && buttonItem.event == 'refund'" class="wlm-text" type="text" @click="changeTableItem({id:scope.row.order_id},tableFormatData.announcement.change.refund,{isWarning: true,warning:'确定是否帮助用户退款？',cancel:'已取消'})">{{buttonItem.text}}</el-button> -->
                      <!-- 售后处理 -->
                      <el-button
                        v-if="buttonItem.value == 1 && buttonItem.event == 'after_sale'"
                        class="wlm-text"
                        type="text"
                        @click="$router.push({path:'/orders/afterSale',query:{order_id:scope.row.order_id}})"
                      >{{buttonItem.text}}</el-button>
                      <!-- 延期 -->
                      <!-- <el-button  class="wlm-text" type="text" @click="showDialog({formType:'3-1',params:{id:scope.row.order_id, toggle:'dialogTableVisible',noEdit:true}})">延期</el-button> -->
                      <el-button
                        v-if="buttonItem.value == 1 && buttonItem.event == 'delay'"
                        class="wlm-text"
                        type="text"
                        @click="showDialog({formType:'3-1',params:{id:scope.row.order_id, toggle:'dialogTableVisible',noEdit:true}})"
                      >延期</el-button>
                      <el-button
                        v-if="buttonItem.value == 1 && buttonItem.event == 'simulation'"
                        class="wlm-text"
                        type="text"
                      >模拟成团</el-button>
                      <el-button
                        v-if="buttonItem.value == 1 && buttonItem.event == 'update_price'"
                        class="wlm-text"
                        @click="showDialog({formType:'4',params:{id:scope.row.order_id, toggle:'dialogTableVisible',noEdit:true}})"
                        type="text"
                      >改价</el-button>
                    </div>
                  </div>
                </div>
                <div v-else>
                  <el-button
                    type="text"
                    @click="forcedbtn(scope.row.order_id)"
                  >强制下单</el-button>
                  <el-button
                    class="wlm-text"
                    type="text"
                    @click="showDialog({formType:'5',params:{id:scope.row.order_id,noEdit:true},is_abnormal:scope.row.is_abnormal})"
                  >退款</el-button>

                </div>
              </div>
              <div v-else>
                
                <div
                  class="flex-row flex-align-c"
                  style="position: absolute;right: 15px;bottom:5px;white-space: nowrap;z-index:1"
                >
                  <!--is_refund 10未申请 20已申请 30已完成   申请退款
                    pay_status.value  10未付款 20已付款   付款状态
                                      -->
                  <div
                    class="flex-row"
                    v-if="scope.row.first_user_name&&scope.row.is_refund != 30&&scope.row.pay_status.value == 20"
                  >
                    <div
                      style="margin-right:10px;"
                      v-if="scope.row.first_user_id"
                    >1级佣金：{{scope.row.first_user_name}}(mid:{{scope.row.first_user_id}}) {{scope.row.first_money}} 元</div>
                    <div
                      style="margin-right:10px;"
                      v-if="scope.row.second_user_id"
                    >2级佣金：{{scope.row.second_user_name}}(mid:{{scope.row.second_user_id}}) {{scope.row.second_money}} 元</div>
                    <div
                      style="margin-right:10px;"
                      v-if="scope.row.third_user_id"
                    >3级佣金：{{scope.row.third_user_name}}(mid:{{scope.row.third_user_id}}) {{scope.row.third_money}} 元</div>
                  </div>
                  <!-- <el-button
                    v-if="scope.row.first_user_name&&scope.row.dealer_settled==0"
                    type="text"
                    @click="openDialogYg({order_id:scope.row.order_id,first_user_name:scope.row.first_user_name,first_user_id:scope.row.first_user_id,first_money:scope.row.first_money,second_user_name:scope.row.second_user_name,second_user_id:scope.row.second_user_id,second_money:scope.row.second_money,third_user_name:scope.row.third_user_name,third_user_id:scope.row.third_user_id,third_money:scope.row.third_money})"
                  >修改佣金</el-button> -->
                </div>
                 <div style="position: absolute;right: 15px;top:5px;">
                    <el-button
                      type="text"
                      @click="repairbtn(scope.row.order_id)"
                    >修复订单</el-button>
                  </div>
                  <router-link
                    class="wlm-text"
                    tag="span"
                    :to="{path:`${linkDetail}`, query:{order_id:scope.row.order_id,nickName:scope.row.user==null?'':scope.row.user.nickName,user_id:scope.row.user==null?'':scope.row.user.user_id,is_ticket:scope.row.is_ticket}}"
                  >
                    <el-button type="text">查看订单</el-button>
                  </router-link>
                    <el-button
                        v-if="scope.row.is_abnormal==1"
                        class="wlm-text"
                        type="text"
                        @click="showDialog({formType:'5',params:{id:scope.row.order_id,toggle:'dialogTableVisible',noEdit:true}})"
                      >退款</el-button>
                <div v-if="scope.row.pay_status.value==20">
                  <div v-if="scope.row.is_refund!=30">
                    <el-button
                      type="text"
                      v-if="scope.row.is_generate_order==2"
                      @click="dangbtn(scope.row.order_id)"
                    >手动生成第三方订单</el-button>
                    <el-button
                      type="text"
                      v-if="scope.row.is_generate_order==1&& scope.row.is_ticket_pay==2"
                      @click="dingbtn(scope.row.order_id)"
                    >手动支付第三方订单</el-button>
                    <div>
                      <!--票务在第三方已被验证后不能显示退款（已完成的订单不显示退款按钮）-->
                      <el-button
                        v-if="scope.row.delivery_status.value!=20&&scope.row.receipt_status.value!=20&&scope.row.order_status!=30"
                        class="wlm-text"
                        type="text"
                        @click="showDialog({formType:'5',params:{id:scope.row.order_id,toggle:'dialogTableVisible',noEdit:true},is_ticket:scope.row.is_ticket})"
                      >退款</el-button>

                    </div>
                  </div>
                  <div v-else>
                    <p>{{scope.row.state_text}}</p>
                  <p v-if="scope.row.recover_commission==1 && scope.row.state_text=='已退款'">佣金已追回</p>

                  </div>
                </div>
                <div v-if="scope.row.ticket_type==3&&scope.row.is_generate_order==1&&scope.row.is_ticket_pay==1&&scope.row.submit_refund==0">
                    <el-button
                      type="text"
                      @click="applyforArefund(scope.row.order_no,scope.row.order_id)"
                    >申请退款</el-button>
                </div>

              </div>
            </template>

          </el-table-column>
        </el-table>
        <div class="pagination-content flex-row flex-justify-b flex-align-c">
          <el-row class="pagination-btns">
          </el-row>
          <el-pagination
            :disabled="!hasTableData"
            @size-change="listPageChange"
            @current-change="listPageChange"
            :current-page.sync="tableFormatData.announcement.pagination.page"
            :page-sizes="tableFormatData.announcement.pagination.pagesizes"
            :page-size.sync="tableFormatData.announcement.pagination.list_rows"
            layout="total, sizes, prev, pager, next, jumper"
            :total="hasTableData?tableFormatData.announcement.pagination.total : 0"
          >
          </el-pagination>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import {
  orderList,
  orderSend,
  orderDelay,
  orderCodeList,
  orderCheckCode,
  orderSelfDelery,
  orderRefund,
  orderConfirmPay,
  getExpress,
  orderUpdatePrice,
  editOrderSend,
  editDealerMoney,
  getBusForGiftOrder,
  orderRepair,
  manualTicketOrder,
  manualPayment,
  orderReceipt,
  forcedOrder,
  ticketCode,
  refundTicketOrder
} from '@/api/orders'
import {
  addBackstageRemark,
  shopIndex
} from '@/api/merchant'

import exceldown from '@/directive/exceldown'
import mixins from '@/mixins/mixins'
import Span from '../community-purchase/span.vue'
export default {
  mixins: [mixins.getters('Table'), mixins.getters('Form')],
  name: 'OrdersManagement',
  computed: {
    pathUrl() {
      return '/uploadFile'
    },
    $tableDataFilter() {
      const filterData = this.tableFormatData.announcement.tableData.filter(item => {
        return item.group_show !== 1
      })
      return filterData
    },
    autoGroups() {
      return this.$route.query.auto_groups === '1'
    },
    isVerification() {//核销订单
      return this.$route.path === '/orders/ordersVerificationManagement'
    },
    isComeStore() {//自提订单
      return this.$route.path === '/orders/ordersComeStoreManagement'
    },
    isExpress() {//快递订单
      return this.$route.path === '/orders/ordersExpressManagement'
    },
    isCardPassword() {//卡密订单
      return this.$route.path === '/orders/ordersCardPasswordManagement'
    },
    isGroup() {//团购订单
      return this.$route.path === '/orders/ordersGroupManagement'
    },
    Ticketing() {//票务订单
      return this.$route.path === '/orders/ordersTicketingManagement'
    },
    expressType() {
      // 3 ---核销订单
      // 2---自提订单
      // 1 --快递订单
      // 4--卡密订单
      // 5--团购订单
      return this.isVerification ? '3' : (this.isComeStore ? '2' : (this.isExpress ? '1' : (this.isGroup ? '5' : '4')))
    },

    linkDetail() {
      return this.isVerification ? 'ordersVerificationManagementDetail' : this.isComeStore ? 'ordersComeStoreManagementDetail' : this.isExpress ? 'ordersExpressManagementDetail' : 'ordersCardPasswordManagementDetail'
    }
  },
  created() {
    if (this.$route.path == '/orders/ordersTicketingManagement') {
      this.tableFormatData.announcement.files.express_type = ''
      this.tableFormatData.announcement.files.is_ticket = 1
    } else {
      this.tableFormatData.announcement.files.express_type = this.expressType
    }
    this.$nextTick(() => {
      getExpress().then((response) => {
        const { data: { data: msgData = [] } } = response
        this.expressList = msgData
      })
      //   getRefundList().then((response) => {
      //     const {
      //       data: {
      //         data: msgData = []
      //       }
      //     } = response
      //     console.log(msgData, 'msgdata')
      //     this.refundNumber = msgData.number
      //   })
    })
  },
  components: {
    Span

  },
  directives: {
    exceldown
  },
  data() {
    return {
      loading: '',
      is_ticket:'',
      dealer_settled:'',
      express_type_data:'',
      storeidData: [],
      ygData: {},
      moniForm: {},
      transport_type: '',
      dialogVisibleImg: false,
      dialogVisibleYg: false,
      clearDataSQTK:false,
      order_isSQTK:'',
      historyColor: 'red',
      historyRemark: '',
      historyId: '',
      verificationSerch: '',
      verificationData: [],
      verificationDataSQTK:[],
       multipleSelection: [],
       count:1,
      dialogTableVisible: false,
      filename: '订单列表',
      autoWidth: true,
      is_abnormal: '',
      bookType: 'csv',
      afterNewStatus: {
        '1': '售后中',
        '2': '售后拒绝',
        '3': '售后完成',
        '4': '售后取消',
        '5': '售后关闭'
      },
      express_type: {
        1: '',
        2: ''
      },
      payType: {
        'wechat': '微信',
        'admin': '后台确认',
        'alipay': '支付宝',
        'blance': '余额',
        'zero': '零元',
        '-': '-'
      },
      formFormatData: {
        key: 'userForm',
        model: {
          noCreateEdit: false,
          bindDialog: 'dialogTableVisible'
        },
        api: {
          editForm: {
            api: '',
            params: {
              id: ''
            },
            redirect: 'order_id'
          },
          submitForm: orderSend
        },
        formData: {
          store_id: '',
          order_id: '',
          //   time: [0, 0, 0],
          edit_time: '',
          refund_type: '1',
          refund_root: '3',
          proportion:'',
          recover:'1',
          refund_money: '',
          refund_content:'',
          type: '1',
          vercode_id: [],
          express_company: '',
          express_no: '',
          reason: '',
          update_price: '',
          update_express_price: '',
          status: '0',
          customerName: '',
          giftorder: [],
          transport_type: '',
          bus_id: ''
        },
        rules: {
          bus_id: [{ required: true, message: '请确定核销商家', trigger: 'blur' }]
        }
      },
      tableFormatData: {
        current: 'announcement',
        announcement: {
          key: 'announcement',
          api: {
            getList: orderList
          },
          tableData: [],
          files: {
            keytype: '',
            keyword: '',
            order_type: 'all',
            order_status: '0',
            time: [],
            pay_type: '',
            ticket_type:'',
            express_type: '',
            is_ticket: '',
            after_sale_status: '',
            source: '',
            ids: [],
            checkall: '0',
            Recycle: '0',
            redirect: 'order_id'
          },
          change: {
            express_data: {
              name: '物流',
              key: 'express_data',
              api: editOrderSend
            },
            refund: {
              name: '退款',
              key: 'refund',
              api: orderRefund
            },
            payorder: {
              name: '付款',
              key: 'payorder',
              api: orderConfirmPay
            },
            selfDelery: {
              name: '自提',
              key: 'selfDelery',
              api: orderSelfDelery
            },
            delay: {
              name: '延期',
              key: 'delay',
              api: orderDelay
            }
          },
          pagination: {
            page: 1,
            list_rows: 10,
            pagesizes: [10, 20, 50],
            total: 0
          }
        }
      }
    }
  },
  methods: {
    applyforArefund(order_no,order_id){
      this.verificationDataSQTK = []
      this.order_isSQTK = order_id
      ticketCode({order_no:order_no,order_id:order_id}).then(res=>{
        if(res.data.code==1){
          // this.verificationDataSQTK = res.data.data.code
          // console.log("jfdfsdfdsfds",Object.values(res.data.data.code))
          this.clearDataSQTK = true
          res.data.data.code.map(item=>{
           
          this.verificationDataSQTK.push({code:item,count:this.count})

          })

          // console.log("verificationDataSQTK",this.verificationDataSQTK)
        }
      })
    },
     handleSelectionChangeSQTK(val) {
        this.multipleSelection = val;
       console.log("hdshfsdfds",val)
      },
      saveDialogSQTK(){
        console.log("55555",this.multipleSelection)
        if(this.multipleSelection.length==0){
          this.$message.error("请勾选核销码！")
        }else{
          refundTicketOrder({code:this.multipleSelection,order_id:this.order_isSQTK}).then(res=>{
          if(res.data.code==1){
            this.$message.success('操作成功！')
            this.clearDataSQTK=false
          }
        })
        }
      },
    receivingbtn(order_id) {
      this.$confirm('是否确认收货?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        orderReceipt({ order_id: order_id }).then(res => {
          if (res.data.code == 1) {
            this.$message.success(res.data.msg)
            this.filesSerch()
          }
        })

      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    dangbtn(order_id) {
      manualTicketOrder({ order_id: order_id }).then(res => {
        const { data: { code, msg } } = res
        if (code == 1) {
          this.$message.success(msg)
          this.filesSerch()
        }
      })
    },
    dingbtn(order_id) {
      manualPayment({ order_id: order_id }).then(res => {
        const { data: { code, msg } } = res
        if (code == 1) {
          this.$message.success(msg)
          this.filesSerch()

        }
      })
    },
    repairbtn(order_id) {
      this.loading = true
      orderRepair({ order_id: order_id }).then(res => {
        console.log("4444444444444444+9++++", res)
        if (res.data.code == 1) {
          this.loading = false
          this.filesSerch()
          this.tableFormatData.announcement.api.getList
        }
      }).finally(() => {
        this.loading = false
      })
    },
    changbtn() {
      this.formFormatData.formData.store_id = ''
      this.storeidData = ''
      shopIndex({ bus_id: this.formFormatData.formData.bus_id }).then(res => {
        this.storeidData = res.data.data.data
        console.log("resssssssssssssssssssssssssssss", res.data.data.data)
      })
    },
    determineBtn(formFormatData, is_abnormal) {
      //是退款，点击确定后关闭弹窗
      // if(formType==5){
      //   this.dialogTableVisible=false
      // }
      this.dialogTableVisible = false
      this.formFormatSubmit()
    },
    openDialogYg(params) {
      this.ygData = params
      this.dialogVisibleYg = true
    },
    clearDataYg() {
      this.ygData = {}
    },
    saveDialogYg() {
      editDealerMoney({ order_id: this.ygData.order_id, first_money: this.ygData.first_money, second_money: this.ygData.second_money, third_money: this.ygData.third_money }).then((response) => {
        const {
          data: {
            code: msgData = []
          }
        } = response
        if (msgData === 1) {
          this.$message.success('操作成功！')
          this.dialogVisibleYg = false
          this.filesSerch()
        }
      })
    },
    openDialog(color, remark, id) {
      console.log(color, remark, id)
      color === undefined ? this.historyColor = 'red' : this.historyColor = color
      this.historyRemark = remark
      this.historyId = id
      this.dialogVisibleImg = true
    },
    clearData() {
      this.historyColor = ''
      this.historyRemark = ''
      this.historyId = ''
    },
    saveDialog() {
      addBackstageRemark({ id: this.historyId, color: this.historyColor, remark: this.historyRemark, key: 'order' }).then((response) => {
        const {
          data: {
            code: msgData = []
          }
        } = response
        if (msgData === 1) {
          this.$message.success('操作成功！')
          this.dialogVisibleImg = false
          this.filesSerch()
        }
      })
    },
    selectable(row, index) {
      if (row.check_status === 1) {
        return false
      } else {
        return true
      }
    },
    mouseenter(row, isshow, btntype) {
      this.$set(this.tableFormatData.announcement.tableData[row.$index], `${btntype}`, isshow)
    },
    forcedbtn(order_id) {
      this.$confirm('强制下单时，系统会自动填充对应的商品库存使其继续下单成功，是否继续？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.loading = true
        forcedOrder({ order_id: order_id }).then(res => {
          if (res.data.code == 1) {
            this.loading = false
            this.$message.success("操作成功！")
            this.filesSerch()
          }
        }).finally(() => {
          this.loading = false
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    showDialog({ formType, params, is_abnormal,is_ticket,dealer_settled,express_type}) {
      this.transport_type = params.transport_type// 将params中的transport_type赋值给data中的transport_type
      this.is_abnormal = is_abnormal
      this.is_ticket = is_ticket
      this.express_type_data = express_type
      this.dealer_settled = dealer_settled
      console.log("飞机的说法",this.dealer_settled)
      this.formType = formType

      if (this.is_abnormal == 1) {
        this.$confirm('退款成功后，将自动关闭异常订单，是否继续？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          // params['toggle']='dialogTableVisible'
          this.dialogTableVisible = true
          // console.log("dsaaaaaaaaaaaaaaaaaa",params)
          if (formType === '1') {
            this.formFormatData.api.submitForm = orderSend
          } else if (formType === '3') {
            this.formFormatData.formData.store_id = ''
            this.storeidData = ''
            if (this.transport_type != 50) {//如果是礼包商品就先不请求门店接口
              // console.log('9999999999999',params)
              shopIndex({ bus_id: params.bus_id, is_page: '2', goods_id: params.goods_id }).then(res => {
                this.storeidData = res.data.data
                console.log("sdfffffffffffffffffff", this.storeidData)
              })
            }

            this.formFormatData.api.submitForm = orderCheckCode

            // this.filesSerch()  点击确认核销后，会刷新列表，就会自动回到第一页，
          } else if (formType === '3-1') {
            this.formFormatData.api.submitForm = orderDelay
          } else if (formType === '4') {
            this.formFormatData.api.submitForm = orderUpdatePrice
          } else if (formType === '5') {
            this.formFormatData.api.submitForm = orderRefund
          }
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消'
          });
        });
      } else {
        if (formType === '1') {
          this.formFormatData.api.submitForm = orderSend
        } else if (formType === '3') {
          this.formFormatData.formData.store_id = ''
          this.storeidData = ''
          if (this.transport_type != 50) {//如果是礼包商品就先不请求门店接口
            // console.log('9999999999999',params)
            shopIndex({ bus_id: params.bus_id, is_page: '2', goods_id: params.goods_id }).then(res => {
              this.storeidData = res.data.data
              console.log("sdfffffffffffffffffff", this.storeidData)
            })
          }

          this.formFormatData.api.submitForm = orderCheckCode

          // this.filesSerch()  点击确认核销后，会刷新列表，就会自动回到第一页，
        } else if (formType === '3-1') {
          this.formFormatData.api.submitForm = orderDelay
        } else if (formType === '4') {
          this.formFormatData.api.submitForm = orderUpdatePrice
        } else if (formType === '5') {
          this.formFormatData.api.submitForm = orderRefund
        }
      }
      this.formFormatDialogEditEvt(params)
      if (this.isVerification && formType !== '4') {
        this.verificationGet()
      }
    },
    verificationGet() {
      orderCodeList({ order_id: this.formFormatData.formData.order_id, code: this.verificationSerch }).then((response) => {
        let { data: { data: msgData = [] } } = response
        console.log(msgData)
        if (msgData.length > 0) {
          msgData = msgData.filter(item => {
            return item.is_refund !== 30
          })
          this.verificationData = msgData
          this.formFormatData.formData.vercode_id = []
          if (this.verificationData[0]['end_time'] > 0) {
            console.log(this.verificationData[0]['end_time'], 'this.verificationData')
            this.formFormatData.formData.edit_time = this.verificationData[0]['end_time'] * 1000
          }
        }
      })
      getBusForGiftOrder({ order_id: this.formFormatData.formData.order_id }).then((res) => {
        const { data: { data: msgData = [] } } = res
        // console.log("msgData9999999999999999999999999999999999999999",msgData)
        if (msgData.length > 0) {
          this.formFormatData.formData.giftorder = msgData
        }
        console.log('msgData++++++++++++++++++++++', msgData)
        console.log('this.formFormatData.formData+++++++++++++', this.formFormatData.formData)
      })
    },
    verificationSelectionChange(rows) {
      const ids = []
      if (rows.length > 0) {
        rows.map(item => {
          ids.push(item.vercode_id)
        })
      }
      this.formFormatData.formData.vercode_id = ids
    },
    filterButtons(buttons) {
      const btns = buttons.filter(item => {
        return item.value === 1
      })
      return btns
    },
    isFirst(index, data) {
      const isIndex = data.findIndex(item => {
        return item.value === 1
      })
      return (index !== data.length - 1) && (isIndex !== -1)
    },
    hasFirst(data) {
      let result = []
      result = data.filter(item => {
        const isVal = item.value === 1
        return isVal
      })
      return result.length > 1
    },
    updateTime(event) {
      const { target: { value = -1, attributes: { order_id, order_type } } } = event
      //   console.log(event,order_id.value)
      this.extension[`${order_type.value}`] = value
      this.extension.order_id = order_id.value || ''
      console.log(this.extension)
    },
    clearVerification() {
      this.verificationSerch = ''
      this.verificationGet()
    }
  }
}
</script>

<style lang="scss" scoped>
.orders-management {
  .qi-svg {
    font-size: 15px;
    fill: #ccc;
    cursor: pointer;
  }

  .qi-svg.red {
    fill: rgb(245, 108, 108);
  }

  .qi-svg.yellow {
    fill: rgb(250, 212, 0);
  }

  .qi-svg.green {
    fill: rgb(104, 211, 135);
  }

  .qi-svg.blue {
    fill: rgb(64, 158, 255);
  }

  .qi-svg.purple {
    fill: rgb(199, 21, 133);
  }

  .logo {
    height: 32px;
    width: 32px;
    border-radius: 32px;
    vertical-align: middle;
  }

  .vip-img-icon {
    text-align: center;
    font-size: 12px;
    padding: 0px 7px;
    height: 18px;
    line-height: 18px;
    margin-left: 10px;
    border-radius: 4px;
    background: #ffd940;
    color: #fff;
  }

  /deep/ .is-left.no-column .cell {
    display: none !important;
  }

  & .orders-red {
    color: rgb(245, 108, 108);
  }

  /deep/ .el-table__body tr:hover > td {
    background-color: transparent !important;
  }

  /deep/ .el-table__row {
    .no-bor {
      border-right: none;
    }

    &:not(:nth-of-type(0)) {
      .no-bor .el-checkbox {
        position: absolute;
        top: 12px;
      }
    }
  }

  .pad-t-50 {
    padding-top: 48px;
  }

  .pad-b-50 {
    padding-bottom: 48px;
  }

  /deep/ .pad-t-50 {
    .el-scrollbar__wrap {
      overflow-x: hidden;
    }
  }

  .goods-list:nth-of-type(1) {
    padding-top: 48px;
  }

  // .order-box {
  //     padding: 20px;
  //     border: 1px solid #ebeef5;

  //     .order-list {
  //         white-space: nowrap;

  //         &+.order-list {
  //             margin-left: 20px;
  //         }
  //     }
  // }
  .opacity-0 {
    opacity: 0;
  }

  .mar-col {
    margin: 10px 0;
  }
}
</style>
